package com.yhgarden.bbs.mapper.system;

import com.yhgarden.bbs.entity.system.Menu;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * Created by caimb on 2017/4/27.
 */
public interface MenuMapper {

    public int create(Menu menu);

    public int update(Menu menu);

    public int delete(@Param("id") String id);

    public Menu getById(String id);

    public Menu getByIdMoreDetail(String id);

    public List<Menu> getByPid(@Param("pid") String pid);

    public List<Menu> query(@Param("example") Menu menu,
                                  @Param("order") String order,
                                  @Param("field") String field);

    public List<Menu> queryForList(@Param("example") Menu menu,
                                            @Param("order") String order,
                                            @Param("field") String field);

    public List<Menu> queryMoreDetail(@Param("example") Menu menu,
                                            @Param("order") String order,
                                            @Param("field") String field);

    public List<Menu> getByRolesAndUserId(@Param("roleIds") List<String> roleIds,@Param("userId") String userId);
}
